package com.kxmall.web.controller.huishouapp;

import cn.dev33.satoken.annotation.SaIgnore;
import com.kxmall.common.annotation.Log;
import com.kxmall.common.annotation.RepeatSubmit;
import com.kxmall.common.core.controller.BaseAppController;
import com.kxmall.common.core.domain.PageQuery;
import com.kxmall.common.core.domain.R;
import com.kxmall.common.core.page.TableDataInfo;
import com.kxmall.common.core.validate.AddGroup;
import com.kxmall.common.enums.BusinessType;
import com.kxmall.huishou.domain.bo.HsActivityJoinBo;
import com.kxmall.huishou.domain.bo.HsPlatInfoBo;
import com.kxmall.huishou.domain.bo.HsWasteActivityBo;
import com.kxmall.huishou.domain.vo.HsPlatInfoVo;
import com.kxmall.huishou.domain.vo.HsWasteActivityVo;
import com.kxmall.huishou.domain.vo.HsWasteSiteVo;
import com.kxmall.huishou.service.IHsActivityJoinService;
import com.kxmall.huishou.service.IHsPlatInfoService;
import com.kxmall.huishou.service.IHsWasteActivityService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 人工客服
 *
 * @author lf
 * @date 2023-12-01
 */

@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/labour/app")
public class HsAppLabourController extends BaseAppController {

    private final IHsPlatInfoService iHsPlatInfoService;


    /**
     * 查询平台信息表
     */
    @SaIgnore
    @GetMapping("/selectPlatformInformation")
    public R<List<HsPlatInfoVo>> list(HsPlatInfoBo query) {
        List<HsPlatInfoVo> dataList = iHsPlatInfoService.queryList(query);
        if(dataList != null){
            return R.ok(dataList);
        }
        return R.fail("未获取到平台信息表");
    }

    /**
     * APP通过ID查询平台信息表详细信息
     *
     * @param id 主键
     */
    @SaIgnore
    @GetMapping("/{id}")
    public R<HsPlatInfoVo> getAppInfo(@NotNull(message = "主键不能为空")@PathVariable Long id) {
        return R.ok(iHsPlatInfoService.queryById(id));
    }










}
